@import './leaflet-measure-path.scss';


//  控制器
.leaflet-control-container {
    position: absolute;
    right: var(--default-padding);
    top: var(--default-padding);
    z-index: 1000;
    font-size: 12px;
    display: flex;
    flex-direction: row;

    .bg {
        background-color: var(--color-white);
        box-shadow: var(--box-shadow-base);
        border-radius: 4px;
    }

    .left_top_control {
        display: flex;
        margin-right: var(--default-padding);

        .row {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 28px;
            height: 28px;
            cursor: pointer;
            border: solid 1px var(--border-color-base);


            i {
                font-size: 16px;
            }
        }
    }

    .right_top_btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        font-size: 18px;
        border-radius: 4px;
        cursor: pointer;
    }

    .functionopen {
        background-color: var(--color-primary);
        color: #FFFFFF;
    }

    .functionclose {
        background-color: var(--color-white);
    }

    .el-dropdown-link {
        display: flex;
        align-items: center;
    }
}


.leaflet-container {
    .address_popup {
        padding: 10px 15px;

        li {
            line-height: 24px;

            span {
                &:first-of-type {
                    margin-right: 5px;
                }
            }
        }
    }

    .leaflet-bottom-address {
        position: absolute;
        width: 100%;
        display: flex;
        justify-content: center;
        z-index: 1000;
        bottom: -30px;
        height: 30px;

        span {
            background-color: var(--color-white);
            box-shadow: var(--box-shadow-base);
            position: absolute;
            top: -20px;
            padding: 2px 5px;
            border-top-left-radius: 4px;
            border-top-right-radius: 4px;
        }
    }
}


.leaflet-container {
    &.pattern--normal {
        .leaflet {
            &__leftwrapper {
                position: relative;
                width: 100% !important;
                height: 100%;
            }
        }
    }

    &.pattern--resize {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        background-color: var(--app-main);

        .leaflet {
            &__leftwrapper {
                height: 100%;
                width: 100%;
                position: relative;
                float: left;
                margin-right: var(--default-padding);
                border: solid 1px var(--border-color-base);
            }

            &__rightwrapper {
                position: relative;
                height: 100%;
                flex: 1;
                background-color: var(--color-white);
                box-shadow: var(--box-shadow-base);
                border: solid 1px var(--border-color-base);
            }
        }
    }
}


.leaflet-custom-areameasure-cursor { 
    cursor:crosshair; 
} 

.leaflet-custom-areameasure-close {
    background-color: rgba(0, 0, 0, 0.86);
    color: var(--color-white);
    box-shadow: var(--box-shadow-base);
    border-radius: 50%;
    font-size: 14px;
    width: 18px !important;
    height: 18px !important;
    text-align: center;
    line-height: 18px!important;
}


.leaflet-top-center-tips {
    position: absolute;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 1000;
    top: -30px;
    height: 30px;

    span {
        position: absolute;
        color: var(--color-warning);
        box-shadow: var(--box-shadow-base);
        background: var(--color-white);
        padding: 4px 10px;
        top: 30px;
        border-bottom-left-radius: 4px;
        border-bottom-right-radius: 4px;
        letter-spacing: 1px;

        &.twinkle {
            animation: changeshadow 1s ease-in infinite;
        }
    }
}


@keyframes changeshadow {
    0% {
        text-shadow: 0 0 0px var(--color-warning);
    }

    50% {
        text-shadow: 0 0 4px var(--color-warning);
    }

    100% {
        text-shadow: 0 0 0px var(--color-warning);
    }
}